﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TurnamentOrganizer
{
    public partial class NextRoundFormWithPictures : Form
    {
        List<Bitmap> imageList = new List<Bitmap>();

        public NextRoundFormWithPictures(Tournament main)
        {
            InitializeComponent();            

            Bitmap MyImage;
            MyImage = new Bitmap(@"..\..\Images\Tony.jpg");

            Bitmap MyImage2;
            MyImage2 = new Bitmap(@"..\..\Images\Jake.jpg");

            Bitmap MyImage3;
            MyImage3 = new Bitmap(@"..\..\Images\Tigerdyr.jpg");

            Bitmap MyImage4;
            MyImage4 = new Bitmap(@"..\..\Images\honey_monster.jpg");

            Bitmap MyImage5;
            MyImage5 = new Bitmap(@"..\..\Images\knas.jpg");

            imageList.Add(MyImage);
            imageList.Add(MyImage2);
            imageList.Add(MyImage3);
            imageList.Add(MyImage4);
            imageList.Add(MyImage5);
            
            pictureBoxPlayer1.Image = MyImage;
            pictureBoxPlayer1.SizeMode = PictureBoxSizeMode.StretchImage;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Random random = new Random();

            for (int i = 0; i < 40; i++)
            {
                int item = random.Next(0, 5);

                pictureBoxPlayer1.Image = imageList[item];
                pictureBoxPlayer1.Refresh();
                System.Threading.Thread.Sleep(100);
            }
        }
    }
}
